package com.hamster.crmpre.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hamster.crmpre.pojo.CustomerCourseTask;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.Date;

/**
 * @author Tarry
 * @create 2019/12/30 22:21
 */
@Repository
@Mapper
public interface CustomerCourseTaskMapper extends BaseMapper<CustomerCourseTask> {

    //定时结束参课任务，修改state = 1
    @Update("update course_task_result set state = 1 where endTime <= #{date}")
    void updateEndTask(@Param("date") Date date);
}
